import vue from '@vitejs/plugin-vue';
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from '@vant/auto-import-resolver';
import * as path from "node:path";

export default {
  optimizeDeps: {
    exclude: ["wagmi"],
  },
  plugins: [
    vue(),
    AutoImport({
      resolvers: [VantResolver()],
    }),
    Components({
      resolvers: [VantResolver()],
    }),
  ],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src'),
    },
  },
  server:{
    host: '0.0.0.0',
    proxy:{
      "/member":{
        target:"https://clearusdt14.quantify.work/",
        changeOrigin:true,
        rewrite: (path) => path.replace(/^\/member/, 'member')
      }
    }
  }
};
